import { createRouter, createWebHistory } from 'vue-router'
import Home from '../views/Home.vue'

const routes = [
  {
    path: '/',
    name: 'Home',
    component: Home
  },
  {
    path: '/journal',
    name: 'Journal',
    component: () => import('../views/Journal.vue')
  },
  {
    path: '/album',
    name: 'Album',
    component: () => import('../views/Album.vue')
  },
  {
    path: '/personal',
    name: 'Personal',
    component: () => import('../views/Personal.vue')
  },
  {
    path: '/share',
    name: 'Share',
    component: () => import('../views/Share.vue')
  },
  {
    path:"/admin",
    name:"Admin",
    component:()=>import("../views/Admin.vue")
  },
  {
    path:"/article/:id",
    name:"ArticleID",
    component:()=>import("../views/ArticleID")
  },
  {
    path:"/:name(.*)",
    name:"NotFound",
    component:()=>import("../views/NouFound")
  },
  {
    path:"/altInfo",
    name:"AltInfo",
    component:()=>import("../views/altInfo")
  }

]

const router = createRouter({
  history: createWebHistory(process.env.BASE_URL),
  routes
})

export default router
